package com.ruoyi.business.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 设备变量历史数据对象 equipment_variables_history（精简版）
 *
 * @author ldkj
 * @date 2025-02-27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class EquipmentVariablesHistory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 历史记录ID，自增主键 */
    private Long historyId;

    /** 关联的变量ID，外键指向equipment_variables表 */
    @Excel(name = "变量ID")
    private Long variableId;

    /** 变量名称 */
    @Excel(name = "变量名称")
    private String variableName;

    /** 变量英文名称 */
    @Excel(name = "变量英文名称")
    private String variableEnName;

    /** 变量值 */
    @Excel(name = "变量值")
    private String variableValue;

    /** 历史记录创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date recordTimestamp;

    /** 历史记录创建时间 */
    private String rTimestamp;

    /** 操作类型：INSERT, UPDATE, DELETE */
    @Excel(name = "操作类型")
    private String operationType;

    /** 变更前的值 */
    @Excel(name = "变更前值")
    private String oldValue;

    /** 变更后的值 */
    @Excel(name = "变更后值")
    private String newValue;
}
